<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@include file="/resources/common/commonTaglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- 导入资源文件 -->
<%@include file="/resources/common/commonJs.jsp" %>
<%@include file="/resources/common/commonCss.jsp" %>
<title>教师添加</title>
<style type="text/css">
.addTable{
	line-height: 30px;
	border:solid 1px #cbcbcb; /* 设置边框属性；样式(solid=实线)、颜色(#999=灰) */
	text-align: center;
}
.addTable td{
	border:solid 1px #cbcbcb;
	text-align: center;
	letter-spacing:2px;
	width: 10%;
}
</style>
<script type="text/javascript">
function saveStudent() {
	if (!getSubmitFlag($('#studentForm'))) {
		layer.alert('请先验证填写的字段');
		return false;
	}
	$('#studentForm').submit();
}

$(function() {
	// 仅选择日期
	$(".form-date").datetimepicker(	{
	    language:  "zh-CN",
	    weekStart: 1,
	    todayBtn:  1,
	    autoclose: 1,
	    todayHighlight: 1,
	    startView: 2,
	    minView: 2,
	    forceParse: 0,
	    format: "yyyy-mm-dd"
	});
	
	$("input").blur(function() {
		validateInput(this);
	});
	
})
</script>
</head>
<body>
<div align="center" style="margin: 20px 1% 0 1% ">
<form action="${path }/user/studentAdd" method="post" id="studentForm">
<table  cellpadding="0" cellspacing="0"  align="center" class="addTable" style="text-align:center">
	<tr><td colspan="4" align="center">教师信息添加<input type="hidden" name="userType" value="2"/></td></tr>
	<tr>
		<td >姓名：</td>
		<td><input name="name" type="text" class="form-control" data-validate="required"/></td>
		<td>编号：</td>
		<td><input name="userNo" type="text" class="form-control" data-validate="required | number"/></td>	
	</tr>
	<tr>
		<td>性别：</td>
		<td><select name="sex" class="form-control">		
			<option value="1">男</option>
			<option value="2">女</option> 
			</select>
		</td>
		<td>生日：</td>
		<td><input name="birthDay" type="text" class="form-control form-date"/></td>
	</tr>
	<tr>
		<td>院系：</td>
		<td><input name="deptName" type="text" class="form-control" data-validate="required"/></td>
		<td>专业：</td>
		<td><input name="majorName" type="text" class="form-control" data-validate="required"/></td>
	</tr>
	<tr>
		<td>密码：</td>
		<td><input name="pwd" type="text" value="111111" class="form-control" data-validate="required"/></td>
	</tr>
 <tr>
	<td colspan="4">
	<input type="button" value="保存" class="btn btn-primary" onclick="saveStudent()"/>
	<input type="reset" value="重置" class="btn"/>
	</td>
</tr>
</table>
</form>
</div>
</body>
</html>